from django.db import models

from utils.ModelMixin import ModelSetMixin


# Create your models here.

class Classes(ModelSetMixin):
    name = models.CharField(verbose_name='班级名称', max_length=20)
    slogan = models.CharField(verbose_name='口号', max_length=30)

class Student(ModelSetMixin):
    SEX_CHOICES = (
        (0, '女'),
        (1, '男'),
    )
    name = models.CharField(verbose_name='姓名', max_length=10)
    sex = models.IntegerField(verbose_name='性别',null=True, blank=True,choices=SEX_CHOICES)
    age = models.IntegerField(verbose_name='年龄',null=True)
    classes = models.ForeignKey(Classes,on_delete=models.CASCADE,null=True,blank=True)


